import type { ExtensibleEntityDto, ExtensibleObject } from '@abp/ng.core';
import type { SupplyType } from './supply-type.enum';
import type { DocumentStatus } from '../core/document-status.enum';
import type { ItemMasterDto } from '../item-masters/models';
import type { ProductionStatus } from './production-status.enum';

export interface PlanOrderCreateDto extends PlanOrderCreateOrUpdateBase {
  children: PlanOrderPreparationCreateOrUpdateDto[];
}

export interface PlanOrderCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  orderTypeId?: string;
  supplyType: SupplyType;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  releaseQuantity: number;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface PlanOrderDocumentDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderType: PlanOrderTypeDto;
  supplyType: SupplyType;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  releaseQuantity: number;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface PlanOrderDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderTypeId?: string;
  orderType: PlanOrderTypeDto;
  supplyType: SupplyType;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  releaseQuantity: number;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  children: PlanOrderPreparationDto[];
  concurrencyStamp?: string;
}

export interface PlanOrderPreparationCreateOrUpdateDto extends ExtensibleObject {
  id?: string;
  documentId?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  issuedQuantity: number;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface PlanOrderPreparationDto extends ExtensibleEntityDto<string> {
  documentId?: string;
  document: PlanOrderDocumentDto;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  issuedQuantity: number;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface PlanOrderTypeCreateDto extends PlanOrderTypeCreateOrUpdateBase {
}

export interface PlanOrderTypeCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface PlanOrderTypeDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface PlanOrderTypeUpdateDto extends PlanOrderTypeCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface PlanOrderUpdateDto extends PlanOrderCreateOrUpdateBase {
  concurrencyStamp?: string;
  children: PlanOrderPreparationCreateOrUpdateDto[];
}

export interface ProductionOrderCreateDto extends ProductionOrderCreateOrUpdateBase {
  children: ProductionOrderPreparationCreateOrUpdateDto[];
}

export interface ProductionOrderCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  orderTypeId?: string;
  productionStatus: ProductionStatus;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  complatedQuantity: number;
  seiban?: string;
  demandCode?: string;
  itemFormAttribute: number;
  startDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ProductionOrderDocumentDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderType: ProductionOrderTypeDto;
  productionStatus: ProductionStatus;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  complatedQuantity: number;
  seiban?: string;
  demandCode?: string;
  itemFormAttribute: number;
  startDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ProductionOrderDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderTypeId?: string;
  orderType: ProductionOrderTypeDto;
  productionStatus: ProductionStatus;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  complatedQuantity: number;
  seiban?: string;
  demandCode?: string;
  itemFormAttribute: number;
  startDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  children: ProductionOrderPreparationDto[];
  concurrencyStamp?: string;
}

export interface ProductionOrderPreparationCreateOrUpdateDto extends ExtensibleObject {
  id?: string;
  documentId?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  itemFormAttribute: number;
  quantity: number;
  issuedQuantity: number;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ProductionOrderPreparationDto extends ExtensibleEntityDto<string> {
  documentId?: string;
  document: ProductionOrderDocumentDto;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  itemFormAttribute: number;
  quantity: number;
  issuedQuantity: number;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface ProductionOrderTypeCreateDto extends ProductionOrderTypeCreateOrUpdateBase {
}

export interface ProductionOrderTypeCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ProductionOrderTypeDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface ProductionOrderTypeUpdateDto extends ProductionOrderTypeCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface ProductionOrderUpdateDto extends ProductionOrderCreateOrUpdateBase {
  concurrencyStamp?: string;
  children: ProductionOrderPreparationCreateOrUpdateDto[];
}
